﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WordWonderGame.UI.Man3;
using WordWonderGame.Business;

namespace WordWonderGame.UI.Man4
{
    public partial class FormXongMan4 : FormXongMan3
    {
        public int DiemMan4
        {
            get
            {
                return int.Parse(lbDiemVong4.Text.Split(' ')[0]);
            }
            set
            {
                lbDiemVong4.Text = value.ToString() + " điểm";
                lbTongDiem.Text = (DiemMan1 + DiemMan2+DiemMan3 + value).ToString() + " điểm";
            }
        }
        public FormXongMan4()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("Nhập tên bạn!", "Thông báo",MessageBoxButtons.OK,MessageBoxIcon.Warning);
                return;
            }
            DataClassDAL dataClass = new DataClassDAL();
            dataClass.LuuDiem(textBox1.Text, lbTongDiem.Text.Split(' ')[0]);
        }

        private void FormXongMan4_Load(object sender, EventArgs e)
        {

        }
    }
}
